﻿#ifndef _BASEXML_H_
#define _BASEXML_H_

#include "qbasexml_global.h"
#include <string>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>

typedef std::wstring string_type;

#define ReadAttrib(reader, name) name = reader.attributes().value(#name).toString().toStdWString()
#define WriteAttrib(writer, name) writer.writeAttribute(#name, QString::fromStdWString(name));


void QBASEXML_EXPORT skipUnknownElement(QXmlStreamReader &reader);

class QBASEXML_EXPORT QBaseXML
{
public:
	QBaseXML();
	virtual ~QBaseXML();

	virtual void read(QXmlStreamReader &reader) = 0;
	virtual void write(QXmlStreamWriter &writer) = 0;
};

#endif
